<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.text.SimpleDateFormat" %>
<%@page import="java.util.Date" %>
<%@page contentType="text/html; charset=utf-8" %>
<html>
<head>
    <title>emplist</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/ems/css/style.css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath }/ems/js/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath }/ems/js/time.js"></script>

</head>
<body>
<div id="wrap">
    <div id="top_content">
        <div id="header">
            <div id="rightheader">
                <p>
                    <span id="time"></span>
                    <script type="text/javascript">
                        showtime();
                    </script>
                    <br/>
                </p>
            </div>
            <div id="topheader">
                <h1 id="title">
                    <a href="#">main</a>
                </h1>
            </div>
            <div id="navigation">
            </div>
        </div>
        <div id="content">
            <p id="whereami">
            </p>
            <h1>
                Welcome ${user.name}
            </h1>
            <table class="table">
                <tr class="table_header">
                    <td>
                        ID
                    </td>
                    <td>
                        Name
                    </td>
                    <td>
                        Operation
                    </td>
                </tr>
                <s:iterator value="list">
                    <tr class="row1">
                        <td>
                            <s:property value="id"/>
                        </td>
                        <td>
                            <s:property value="name"/>
                        </td>
                        <td>
                            <a href="<s:url value="/dept/delDept"/>?id=<s:property value="id"/>">delete dept</a>&nbsp;
                            <a href="<s:url value="/dept/queryDept"/>?id=<s:property value="id"/>">update dept</a>&nbsp;
                            <a href="<s:url value="/dept/queryAllEmps"/>?id=<s:property value="id"/>">show emps</a>
                        </td>
                    </tr>
                </s:iterator>
            </table>
            <p>
                <input type="button" class="button" value="Add Dept"
                       onclick="location='<s:url value="/ems/dept/addDept.jsp"/>'"/>
            </p>
        </div>
    </div>
    <div id="footer">
        <div id="footer_bg">
            ABC@126.com
        </div>
    </div>
</div>
</body>
</html>
